package com.jiefeng.manager.service.impl;

import com.jiefeng.dao.OrderMapper;
import com.jiefeng.manager.service.PayService;
import com.jiefeng.manager.table.OrderInfo;
import com.jiefeng.manager.queryRequest.OrderInfoRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Created by hts on 2016/6/25.
 */
@Service
public class PayServiceImpl implements PayService{
    private final Logger logger = LoggerFactory.getLogger(RefundServiceImpl.class);

    @Autowired
    private OrderMapper payOrderMapper;
    @Override
    public OrderInfo getOrderListById(String id) {
        OrderInfoRequest request = new OrderInfoRequest();
        request.setId(id);
        return payOrderMapper.get(request);
    }
    @Override
    public List<OrderInfo> getListBypage(OrderInfoRequest orderInfoRequest) {
        return payOrderMapper.getListByPage(orderInfoRequest);
    }

    @Override
    public long countbyParam(Map<String, String> param) {
        return payOrderMapper.countByparam(param);
    }
    @Override
    public int getCount(OrderInfoRequest request) {
        return payOrderMapper.getCount(request);
    }

}
